import { Application } from 'egg';

export default (app: Application) => {
  const { controller, router } = app;
  router.use(async (ctx, next) => {
    ctx.response.set('Access-Control-Allow-Origin', '*');

    await next();
  });
  router.get('/', controller.home.index);
  router.post('/savePdf', controller.savePdf.index);
  router.post('/saveSheet', controller.saveSheet.index);
  router.post('/getSheetDetail', controller.saveSheet.getSheetDetail);
};
